
clear all
set more off
insheet using "manip.csv"

* Combine two columns into one, for each response
foreach num of numlist 1/5 {
	gen resp`num' = max(opolicy_`num', ogaffe_`num')
	}
gen novel = max(opnov, ognov)	

* Label responses
rename resp1 policy
rename resp2 fact
rename resp3 econ
rename resp4 age
rename resp5 race

* Random assignment
gen policycond = 0
replace policycond = 1 if opolicy_1!=.

* Scale everything 0 - 1
foreach var in policy fact econ age race {
	replace `var' = (`var'-1)/4
	}
replace novel = (novel-1)/4 

save "manip.dta", replace

